<?php
namespace App\Services\Evaluation;
use App\Model\Quiz;
use Illuminate\Support\Facades\DB;

class Evaluation
{
    //查询数据库
    public function my(){
        return Quiz::join('test_record','test_record.q_id','=','quiz.id')->get();
    }
    //查询一条数据
    public function seeEvaluationRes(&$id){
        return  Quiz::join('test_record','test_record.q_id','=','quiz.id')->where('test_record.id',$id)->get(['score','finish_time','name','abstract']);
    }
}